package com.dm.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dm.common.JsonResult;
import com.dm.entity.Student;
import com.dm.service.IDormitoryService;
import com.dm.service.IManagerService;
import com.dm.service.IStudentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@ApiOperation("接口")
@RequestMapping("ab")
public class TestController {
    @Autowired
    IStudentService studentService;
    @Autowired
    IDormitoryService dormitoryService;

   @PostMapping("/t1")
    public JsonResult test(){

       return  JsonResult.renderSuccess(dormitoryService.listManager());
   }
    @PostMapping("/t2")
    public JsonResult test(Integer id){
        return  JsonResult.renderSuccess(studentService.getOneStudent(id));
    }
}
